var mammoth = require('mammoth')
const fs = require('fs')

mammoth
  .extractRawText({ path: './output/合同帐户5.3.docx' })
  .then(function (result) {
    var text = result.value // The raw text
    fs.writeFileSync('./rawText.txt', text)
  })
  .catch(function (error) {
    // An error has occurred
    console.error('An error has occurred', error)
  })